﻿<Controls:SinacorWindow
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
	
	WindowStartupLocation="CenterScreen"
    WindowState="Maximized"
	Title="{DynamicResource Bovespa.Alocacao.Label.DigitacaoDistribuicao}"
	
	x:Class="Sinacor.UI.Bovespa.Alocacao.View.SmartClient.DistribuicaoNegociosDigitacao"  
    ModulePlus="true" 
    ModuleId="ORD" >

    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Controls:SinacorExpanderContainer Width="Auto" Height="Auto">
            <Controls:SinacorExpanderContainer.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Controls:SinacorExpanderContainer.RowDefinitions>
            <StackPanel Margin="0,0,0,0" VerticalAlignment="Top" Orientation="Horizontal">
                <!--Atencao - Manter o Expander abaixo (ExpImportacaoDigitacao) como Collapsed - Ele sera usado num proximo Refactoring - Rachel Silvestri Morais - 08/06/2010-->
                <Controls:SinacorExpander
        			Header="{DynamicResource Bovespa.Alocacao.Label.ImportacaoDigitacao}"
        			IsExpanded="True" 
        			Width="504"
        			Visibility="Visible"  
        			x:Name="ExpImportacaoDigitacao" 
					AllowExpand="False">
                    <Grid HorizontalAlignment="Left" Width="Auto">
                        <Controls:SinacorLabel HorizontalAlignment="Left" 
        					Content="{DynamicResource Bovespa.Alocacao.Label.Layout}" 
        					Width="150" 
        					HorizontalContentAlignment="Left" 
        					IsTargetFieldRequired="True"/>
                        <Controls:SinacorComboBox x:Name="cmbLayoutsImportacao"
                            IsSynchronizedWithCurrentItem="True" 
        					HorizontalAlignment="Left" 
        					Margin="0,21,0,0" 
        					VerticalAlignment="Top" 
        					Width="150"
        					TabIndex="1" 
							WidthPopup="340"
                            IsRequired="True" />
                        <Controls:SinacorLabel HorizontalAlignment="Left" 
        					Content="{DynamicResource Bovespa.Alocacao.Label.Arquivo}" 
        					Width="70" 
        					Margin="154,0,0,0" 
        					HorizontalContentAlignment="Left"
                            IsTargetFieldRequired="True"/>
                        <Controls:SinacorFilePicker x:Name="flpDistribuicaoImportacao"
                            HorizontalAlignment="Left" 
        					Margin="154,21,0,0" 
        					VerticalAlignment="Top" 
        					WidthPath="250"
        					TabIndex="2"
                            Value="{Binding FiltroImportacao.NomeArquivo}"
                            Filter="XLS|*.xls"
                            IsRequired="True"
                            ValidateIfPathExists="True"/>
                        <Controls:SinacorGroupBox VerticalAlignment="Stretch" Header="Status" Height="Auto" Margin="0,46,0,0" Width="Auto">
                            <Grid Height="27">
                                <Controls:SinacorProgressBar x:Name="pgbDistribuicaoProgresso"
                                    Margin="0,0,0,0" 
                                    HorizontalAlignment="Left" 
                                    VerticalAlignment="Top" 
                                    Width="267"
                                    Value="{Binding StatusProcesso.Progress}"/>
                                <Controls:SinacorButton x:Name="btnDistribuicaoImportacao"
                                    HorizontalAlignment="Left"
               					    Margin="271,-2,0,0"
               					    Width="95"
               					    Content="{DynamicResource Bovespa.Alocacao.Label.Importar}"
               					    VerticalAlignment="Top"
               					    TabIndex="3" 
                                    OnBufferedClick="btnDistribuicaoImportacao_OnBufferedClick"
                                    CausesValidation="True" />
                                <Controls:SinacorButton x:Name="btnCancelarImportacao"
                                    HorizontalAlignment="Left"
               					    Width="95"
               					    Content="{DynamicResource Bovespa.Alocacao.Label.Cancelar}" 
               					    VerticalAlignment="Top"
               					    TabIndex="3" d:LayoutOverrides="VerticalAlignment" Margin="370,-2,0,0"
                                    IsEnabled="False"
                                    OnBufferedClick="btnCancelarImportacao_OnBufferedClick"
                                    CausesValidation="False" />

                            </Grid>
                        </Controls:SinacorGroupBox>
                    </Grid>
                </Controls:SinacorExpander>
                <Controls:SinacorExpander
        			Header="{DynamicResource Bovespa.Alocacao.Label.ControleDistribuicao}"
        			IsExpanded="True" 
        			Width="Auto" 
        			x:Name="ExpControleDistribuicao" 
					AllowExpand="False" 
					Margin="4,0,0,0" >
                    <Grid>
                        <StackPanel	Orientation="Vertical" 
        					x:Name="TabelaControleDistribuicao" 
        					Margin="0,0,0,0" 
        					HorizontalAlignment="Left">
                            <StackPanel	Orientation="Horizontal" 
        						x:Name="Linha1_1">
                                <Border	Width="107" 
        							Style="{DynamicResource ControlBorderEmpty}" 
									x:Name="BorderVazio"/>
                                <Border	Width="180"
        							Margin="-1,0,0,0"
        							Style="{DynamicResource ControlBorderHeader}" 
        							HorizontalAlignment="Left" 
        							VerticalAlignment="Top" 
									x:Name="BorderHeader1" >
                                    <Controls:SinacorTextBox Foreground="{DynamicResource BrushTextBox2}"
        								Width="178"
        								HorizontalContentAlignment="Center"
        								Text="{DynamicResource Bovespa.Alocacao.Label.Selecionados}"
        								IsReadOnly="True"
        								Style="{DynamicResource ControlDataGridSinacorTextBox}"
                                        x:Name="txtSelecionados"
                                                             
                                                             />
                                </Border>
                                <Border	Width="180"
        							Style="{DynamicResource ControlBorderHeader}" 
        							Margin="-1,0,0,0" 
        							HorizontalAlignment="Left" 
        							VerticalAlignment="Top" 
									x:Name="BorderHeader2" >
                                    <Controls:SinacorTextBox Foreground="{DynamicResource BrushTextBox2}"
        								Width="178"
        								HorizontalContentAlignment="Center"
        								Text="{DynamicResource Bovespa.Alocacao.Label.Digitados}"
        								IsReadOnly="True"
        								Style="{DynamicResource ControlDataGridSinacorTextBox}" 
        								HorizontalAlignment="Stretch" 
        								VerticalAlignment="Stretch" 
        								Margin="0,0,0,0" 
                                        x:Name="txtDigitados" />
                                </Border>
                            </StackPanel>
                            <StackPanel	Orientation="Horizontal"
        						Margin="0,-1,0,0"
        						x:Name="Linha2_1">
                                <Border	Width="107"
        							Style="{DynamicResource ControlBorderHeader}" 
        							HorizontalAlignment="Left" 
        							VerticalAlignment="Top" 
									x:Name="BorderHeaderLateral1" >
                                    <Controls:SinacorTextBox Foreground="{DynamicResource BrushTextBox2}"
        								Width="105"
        								HorizontalContentAlignment="Right"
        								Text="{DynamicResource Bovespa.Alocacao.Label.Percentual}"
        								IsReadOnly="True"
        								Style="{DynamicResource ControlDataGridSinacorTextBox}" />
                                </Border>
                                <Border	Width="180"
        							Margin="-1,0,0,0"
        							Style="{DynamicResource ControlBorderTransparent}" 
        							HorizontalAlignment="Left" 
        							VerticalAlignment="Top" >
                                    <Controls:SinacorDecimalTextBox Width="178"
        								ToolTip="{DynamicResource Bovespa.Alocacao.Tooltip.PercentualDistribuir}"
        								IsReadOnly="True"
        								Style="{DynamicResource ControlDataGridSinacorTextBox}" 
        								HorizontalContentAlignment="Right" 
                                        x:Name="txtPercDistribuir"
                                        Value="{Binding SelecionadosPercentual}"
                                        Integers="3"
                                        Decimals="2"
                                                             />
                                </Border>
                                <Border	Width="180"
        							Style="{DynamicResource ControlBorderTransparent}" 
        							Margin="-1,0,0,0" 
        							HorizontalAlignment="Left" 
        							VerticalAlignment="Top" >
                                    <Controls:SinacorDecimalTextBox Width="178"
        								ToolTip="{DynamicResource Bovespa.Alocacao.Tooltip.PercentualDistribuido}"
        								IsReadOnly="True"
        								Style="{DynamicResource ControlDataGridSinacorTextBox}" 
        								HorizontalContentAlignment="Right" 
                                        x:Name="txtPercDistribuido"        
                                        Integers="12"
                                        Decimals="2"
                                                             />
                                </Border>
                            </StackPanel>
                            <StackPanel	Orientation="Horizontal"
        						x:Name="Linha3_1" 
        						Margin="0,-1,0,0">
                                <Border	Width="107"
        							Style="{DynamicResource ControlBorderHeader}" 
        							HorizontalAlignment="Left" 
        							VerticalAlignment="Top" 
									x:Name="BorderHeaderLateral2" >
                                    <Controls:SinacorTextBox Foreground="{DynamicResource BrushTextBox2}"
        								Width="105"
        								HorizontalContentAlignment="Right"
        								Text="{DynamicResource Bovespa.Alocacao.Label.Quantidade}"
        								IsReadOnly="True"
        								Style="{DynamicResource ControlDataGridSinacorTextBox}" />
                                </Border>
                                <Border	Width="180"
        							Margin="-1,0,0,0"
        							Style="{DynamicResource ControlBorderTransparent}"
        							HorizontalAlignment="Left" 
        							VerticalAlignment="Top" >
                                    <Controls:SinacorDecimalTextBox Width="178"
        								ToolTip="{DynamicResource Bovespa.Alocacao.Tooltip.QuantidadeDistribuir}"
        								IsReadOnly="True" 
        								HorizontalContentAlignment="Right"
                                        x:Name="txtQtdDistribuir"
                                        Value="{Binding SelecionadosQuantidade}"
                                        Integers="12"
                                        Decimals="4"
        								Style="{DynamicResource ControlDataGridSinacorTextBox}" />
                                </Border>
                                <Border	Width="180"
        							Style="{DynamicResource ControlBorderTransparent}" 
        							Margin="-1,0,0,0" 
        							HorizontalAlignment="Left" 
        							VerticalAlignment="Top" >
                                    <Controls:SinacorDecimalTextBox Width="178"
        								ToolTip="{DynamicResource Bovespa.Alocacao.Tooltip.QuantidadeDistribuida}"
        								IsReadOnly="True"
        								HorizontalContentAlignment="Right"
                                        x:Name="txtQtdDistribuida"  
                                        Integers="12"
                                        Decimals="4"
        								Style="{DynamicResource ControlDataGridSinacorTextBox}" />
                                </Border>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </Controls:SinacorExpander>
            </StackPanel>



            <Controls:SinacorExpander Grid.Row="1" Grid.ColumnSpan="2" 
									  HorizontalAlignment="Stretch"
									  VerticalAlignment="Stretch"
									  Header="{DynamicResource Bovespa.Alocacao.Label.DigitacaoDistribuicao}"
									  IsExpanded="True" 
									  Margin="0,4,0,0" 
									  x:Name="ExpDigitacaoDistribuicao" 
									  AllowExpand="False">
                <Grid>

                    <Controls:SinacorDataGrid x:Name="dtgDigitacaoDistribuicao"
											  ItemsSource="{Binding ListaDigitacao}" 
                                              HorizontalAlignment="Stretch"
											  Width="Auto"						
											  VerticalAlignment="Stretch"
											  Margin="0,0,0,0"
											  AllowDelete="False"											  
											  TabIndex="4" 
                                              SelectionMode="Single"
											  RowEditMode="AllCells"
                                              Inserted="dtgDigitacaoDistribuicao_Inserted"
                                              Updated="dtgDigitacaoDistribuicao_Inserted"
                                              BeingInserted="dtgDigitacaoDistribuicao_BeingInserted"
                                              BeingUpdated="dtgDigitacaoDistribuicao_BeingInserted"
                                              EndingInsert="dtgDigitacaoDistribuicao_EndingInsert"
                                              EndingUpdate="dtgDigitacaoDistribuicao_EndingInsert"
                                              SavingAll="dtgDigitacaoDistribuicao_SavingAll" 
                                              CancelingInsert="dtgDigitacaoDistribuicao_CancelingInsert"
                                              CancelingUpdate="dtgDigitacaoDistribuicao_CancelingInsert"
                                              >
                        <Controls:SinacorDataGrid.ContextMenuTemplate>
                            <DataTemplate>
                                <StackPanel>
                                    <Controls:SinacorContextMenuItem 
                                        x:Name="ContextMenu_ValidarDigitacao" 
                                        Header="{DynamicResource Bovespa.Alocacao.Label.ValidarDigitacao}"
                                        Loaded="ContextMenu_ValidarDigitacao_Loaded"
                                        Click="ContextMenu_ValidarDigitacao_Click"/>
                                </StackPanel>
                            </DataTemplate>
                        </Controls:SinacorDataGrid.ContextMenuTemplate>
                        <Controls:SinacorDataGrid.Columns>
                            <Controls:Column Name="Cliente" 
    										 Title="Bovespa.Alocacao.Label.Cliente"
                                             DisplayMemberPath="Cliente"
                                             AllowUpdate="True"
                                             AllowInsert="True"
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">

                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorInt32TextBox
                                                             Integers="7"
                                                             IsFormated="False"
                                                             x:Name="Cliente"
                                                             Value="{Binding Cliente}"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>

                            </Controls:Column>
                            <Controls:Column Name="DVCliente" 
    										 Title="Bovespa.Alocacao.Label.DV" 
                                             DisplayMemberPath="DigitoVerificadorCliente"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorInt16TextBox 
                                                             Integers="1"
                                                             IsFormated="False"
                                                             x:Name="DVCliente"
                                                             Value="{Binding DigitoVerificadorCliente}"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>

                            </Controls:Column>
                            <Controls:Column Name="Ativo" 
    										 Title="Bovespa.Alocacao.Label.Ativo"
                                             DisplayMemberPath="CodigoNegocio"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorTextBox 
                                                             MaxLength="12"
                                                             x:Name="Ativo"
                                                             CharacterCasing="Upper"
                                                             Text="{Binding CodigoNegocio}"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>

                            </Controls:Column>
                            <!---->
                            <Controls:Column Name="Quantidade" 
    										 Title="Bovespa.Alocacao.Label.Quantidade" 
                                             DisplayMemberPath="QuantidadeEspecificar"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                            <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorDecimalTextBox                                                             
                                                             Integers="12"
                                                             Decimals="4"   
                                                             x:Name="TxtQuantidade"
                                                             Value="{Binding QuantidadeEspecificar}"                                                             
                                                             LostFocus="Quantidade_LostFocus"
                                                             PreviewKeyDown="Quantidade_PreviewKeyDown"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>

                            </Controls:Column>
                            <Controls:Column Name="Preco" 
    										 Title="Bovespa.Alocacao.Label.Preco" 
                                             DisplayMemberPath="Preco"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                 <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorDecimalTextBox                                                            
                                                             Integers="12"
                                                             Decimals="8"
                                                             x:Name="TxtPreco"
                                                             Value="{Binding Preco}"                                                             
                                                             LostFocus="Preco_LostFocus"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>

                            </Controls:Column>
                            <Controls:Column Name="PercentualDistribuicao" 
    										 Title="Bovespa.Alocacao.Label.Percentual"
                                             DisplayMemberPath="Percentual"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorDecimalTextBox                                                             
                                                             Integers="3"
                                                             Decimals="8"
                                                             x:Name="TxtPercentualDistribuicao"
                                                             Value ="{Binding Percentual}"                                                             
                                                             LostFocus="TxtPercentualDistribuicao_LostFocus"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>

                            </Controls:Column>
                            <Controls:Column Name="TipoLiquidacao" 
    										 Title="Bovespa.Alocacao.Label.TipoLiq" 
                                             AutoAdjustWidthToContent="False"
                                             Width="80"
                                             DisplayMemberPath="Direcionado.TipoLiquidacao"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorComboBox x:Name="cmbTipoLiquidacao" 
                                                                  ItemsSource="{ Binding Presenter.ListaTiposLiquidacao, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:SinacorWindow}} }" 
                                                                  SelectedValue="{Binding Direcionado.TipoLiquidacao}" 
                                                                  WidthPopup="300" 
                                                                  MaxLength="50"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>

                            </Controls:Column>
                            
                            <!---->
                            <Controls:Column Name="Carteira" 
    										 Title="Bovespa.Alocacao.Label.Carteira" 
                                             DisplayMemberPath="Carteira"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorInt32TextBox 
                                                             Integers="3"
                                                             IsFormated="False"
                                                             x:Name="Carteira"
                                                             Value="{Binding Carteira}"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>

                            </Controls:Column>
                            <Controls:Column Name="Mercado" 
    										 Title="Bovespa.Alocacao.Label.Mercado"
                                             AutoAdjustWidthToContent="False"
                                             Width="80"
                                             DisplayMemberPath="Mercado"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorComboBox x:Name="cmbTipoMercado" 
                                                                  ItemsSource="{ Binding Presenter.ListaTiposMercado, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:SinacorWindow}} }"                                                                   IsSynchronizedWithCurrentItem="True" 
                                                                  SelectedValue="{Binding Mercado}" 
                                                                  WidthPopup="300" 
                                                                  MaxLength="50"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>
                            </Controls:Column>

                            <Controls:Column Name="ClienteDirecionado" 
    										 Title="Bovespa.Alocacao.Label.ClienteDirecionado" 
                                             DisplayMemberPath="Direcionado.Cliente"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorInt32TextBox
                                                             Integers="7"
                                                             IsFormated="False"
                                                             x:Name="ClienteDirecionado"
                                                             Value="{Binding Direcionado.Cliente}"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>
                            </Controls:Column>

                            <Controls:Column Name="DVClienteDirecionado" 
    										 Title="Bovespa.Alocacao.Label.DV"
                                             DisplayMemberPath="Direcionado.DigitoVerificadorCliente"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorInt16TextBox 
                                                             Integers="1"
                                                             IsFormated="False"
                                                             x:Name="DVClienteDirecionado"
                                                             Value="{Binding Direcionado.DigitoVerificadorCliente}"/>

                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>
                            </Controls:Column>

                            <Controls:Column Name="UsuarioDirecionado"
                                         Title="Bovespa.Alocacao.Label.UsuarioDirecionado"
										 HorizontalCellAlignment="Right"
                                         DisplayMemberPath="Direcionado.Usuario"                                         
                                         AllowUpdate="True"
                                         AllowInsert="True" 
                                         CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">


                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                        <Controls:SinacorInt32TextBox IsRequired="False" 
                                                             Integers="5"
                                                             IsFormated="False"
                                                             x:Name="txtDirUsuario" 
                                                             Value="{Binding Direcionado.Usuario}"/>
                                    </DataTemplate>
                                </Controls:Column.CellUpdateTemplate>
                            </Controls:Column>

                            <!---->
                            <Controls:Column Name="PercReducaoAcrescimo" 
    										 Title="Bovespa.Alocacao.Label.PerRedAcr"
                                             DisplayMemberPath="Direcionado.PercentualReducaoAcrescimo"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                    <Controls:SinacorDecimalTextBox                                                             
                                                             Integers="3"
                                                             Decimals="8"   
                                                             x:Name="PercReducaoAcrescimo"
                                                             Value="{Binding Direcionado.PercentualReducaoAcrescimo}"/>

                                </DataTemplate>
                            </Controls:Column.CellUpdateTemplate>
                            </Controls:Column>

                            <Controls:Column Name="Dolar" 
    										 Title="Bovespa.Alocacao.Label.Dolar"
                                             DisplayMemberPath="Dolar"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                    <Controls:SinacorDecimalTextBox                                                             
                                                             Integers="7"
                                                             Decimals="4"   
                                                             x:Name="Dolar"
                                                             Value="{Binding Dolar}"/>

                                </DataTemplate>
                            </Controls:Column.CellUpdateTemplate>
                            </Controls:Column>
                            
                            <Controls:Column Name="IndLiquidacaoExternaCliente" 
    										 Title="Bovespa.Alocacao.Label.IndLiqExternaCliente" 
                                             DisplayMemberPath="IndicadorLiquidacaoExternaCliente"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                    <Controls:SinacorCheckBox 
                                                             x:Name="IndLiquidacaoExternaCliente"
                                                             IsChecked ="{Binding IndicadorLiquidacaoExternaCliente}"/>

                                </DataTemplate>
                            </Controls:Column.CellUpdateTemplate>
                            </Controls:Column>
                                
                            <Controls:Column Name="IndSistemaExterno" 
    										 Title="Bovespa.Alocacao.Label.IndSistemaExterno2" 
                                             DisplayMemberPath="IndicadorSistemaExterno"
                                             AllowUpdate="True"
                                             AllowInsert="True" 
                                             CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                <Controls:Column.CellUpdateTemplate>
                                    <DataTemplate>
                                    <Controls:SinacorTextBox  
                                                             MaxLength="18"
                                                             x:Name="IndLiquidacaoExternaCliente"
                                                             Text="{Binding IndicadorSistemaExterno}"/>

                                </DataTemplate>
                            </Controls:Column.CellUpdateTemplate>
                            </Controls:Column>

                        </Controls:SinacorDataGrid.Columns>
                    </Controls:SinacorDataGrid>

                </Grid>
            </Controls:SinacorExpander>


        </Controls:SinacorExpanderContainer>
    </Grid>

</Controls:SinacorWindow>

